package com.itkjb.leisurely.resource.common;

import com.itkjb.leisurely.core.base.BaseConstants;

/**
 * Copyright (C), 2018-2020
 *
 * @Author: lix
 * @Date: 2020-06-01 10:06
 * @Description: 系统常量
 * @Version: V1.0.0
 */
public final class SysConstants implements BaseConstants {


    // public static final String UPDATE_ERROR_MESSAGE = "没有数据被更新或数据已非最新数据";
    /**
     * 部门的key
     */
    public static final String DEPARTMENT_KEY ="sys_dept_";
    /**
     * 菜单的的key
     */
    public static final String MENU_KEY ="sys_menu_";

    /**
     * 字典分组key
     */
    public static final String DICT_GROUP_KEY ="sys_dict_group_";

    /**
     * 120 秒
     */
    public static final int TIME_120_SECOND = 120;
    /**
     * 30 分钟
     */
    public static final int TIME_30_MIN = 1800;
    /**
     * 2 小时
     */
    public static final int TIME_2_HOUR = 7200;

    public static final String[] INWARD_ROLE_CODE= {ADMINISTRATOR_ROLE_CODE};

    public enum DataLevel{
        /**
         * 个人
         */
        empty(0,"个人"),
        /**
         * 个人
         */
        user(1,"个人"),
        /**
         * 当前部门
         */
        curDep(2,"当前部门"),
        /**
         * 按钮
         */
        curDepAndSub(4,"当前部门和下级部门"),
        ;
        private int key;
        private String value;

        DataLevel(int key, String value) {
            this.key = key;
            this.value = value;
        }

        public int getKey() {
            return key;
        }

        public void setKey(int key) {
            this.key = key;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }
    /**
     * 菜单类型
     */
    public enum MenuType {
        /**
         * 目录
         */
        DIR(1,"目录"),
        /**
         * 菜单
         */
        MENU(2,"菜单"),
        /**
         * 按钮
         */
        BUTTON(4,"按钮"),
        ;
        private int key;
        private String value;

        MenuType(int key, String value) {
            this.key = key;
            this.value = value;
        }

        public int getKey() {
            return key;
        }

        public void setKey(int key) {
            this.key = key;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

}
